//
//  xiaoxiViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/11/28.
//  Copyright (c) 2015年 com.ppfur. All rights reserved.
//

#import "xiaoxiViewController.h"

@interface xiaoxiViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;
}

@end

@implementation xiaoxiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    _mytable.frame=CGRectMake(0, 0, width, height);
    _mytable.scrollEnabled=NO;
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 4;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 2;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 60;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if (cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray *row1=[cell.contentView subviews];
    //cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;//右箭头
    for (UIView *vv2 in row1)
    {
        [vv2 removeFromSuperview];
    }
    //    if (indexPath.row==0) {
    if(width==375){
        UIImageView*vv1=[[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 50, 50)];
        vv1.image = [UIImage imageNamed:@"zxjl1.jpg"];
        [cell.contentView addSubview:vv1];
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(65, 5, 100, 20)];
        ll1.font=[UIFont systemFontOfSize:15.0f];
        ll1.text=@"某某商家";
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(65, 33, 260, 20)];
        ll2.font=[UIFont systemFontOfSize:13.0f];
        ll2.text=@"您买的宝贝已经发出，您购买的宝贝已发出.";
        ll2.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll2];
        UILabel*ll3=[[UILabel alloc] initWithFrame:CGRectMake(300, 5, 40, 20)];
        ll3.font=[UIFont systemFontOfSize:12.0f];
        ll3.text=@"13:21";
        ll3.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll3];
    }else if(width==320){
        UIImageView*vv1=[[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 45, 45)];
        vv1.image = [UIImage imageNamed:@"zxjl1.jpg"];
        [cell.contentView addSubview:vv1];
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(60, 5, 100, 20)];
        ll1.font=[UIFont systemFontOfSize:15.0f];
        ll1.text=@"某某商家";
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(60, 33, 260, 20)];
        ll2.font=[UIFont systemFontOfSize:12.0f];
        ll2.text=@"您买的宝贝已经发出，您购买的宝贝已发出.";
        ll2.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll2];
        UILabel*ll3=[[UILabel alloc] initWithFrame:CGRectMake(280, 5, 40, 20)];
        ll3.font=[UIFont systemFontOfSize:12.0f];
        ll3.text=@"13:21";
        ll3.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll3];
    }else{
        UIImageView*vv1=[[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 50, 50)];
        vv1.image = [UIImage imageNamed:@"zxjl1.jpg"];
        [cell.contentView addSubview:vv1];
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(65, 5, 100, 20)];
        ll1.font=[UIFont systemFontOfSize:15.0f];
        ll1.text=@"某某商家";
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(65, 33, 260, 20)];
        ll2.font=[UIFont systemFontOfSize:13.0f];
        ll2.text=@"您买的宝贝已经发出，您购买的宝贝已发出.";
        ll2.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll2];
        UILabel*ll3=[[UILabel alloc] initWithFrame:CGRectMake(340, 5, 40, 20)];
        ll3.font=[UIFont systemFontOfSize:12.0f];
        ll3.text=@"13:21";
        ll3.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll3];
        
        
    }
    //    }else if(indexPath.row==1){
    //        UIImageView*vv1=[[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 50, 50)];
    //        vv1.image = [UIImage imageNamed:@"zxjl1.jpg"];
    //        [cell.contentView addSubview:vv1];
    //        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(65, 5, 100, 20)];
    //        ll1.font=[UIFont systemFontOfSize:15.0f];
    //        ll1.text=@"某某商家";
    //        [cell.contentView addSubview:ll1];
    //        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(65, 33, 260, 20)];
    //        ll2.font=[UIFont systemFontOfSize:13.0f];
    //        ll2.text=@"您买的宝贝已经发出，您购买的宝贝已发出.";
    //        ll2.textColor=[UIColor lightGrayColor];
    //        [cell.contentView addSubview:ll2];
    //        UILabel*ll3=[[UILabel alloc] initWithFrame:CGRectMake(300, 5, 40, 20)];
    //        ll3.font=[UIFont systemFontOfSize:12.0f];
    //        ll3.text=@"13:21";
    //        ll3.textColor=[UIColor lightGrayColor];
    //        [cell.contentView addSubview:ll3];
    //    }else if(indexPath.row==2){
    //        UIImageView*vv1=[[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 50, 50)];
    //        vv1.image = [UIImage imageNamed:@"zxjl1.jpg"];
    //        [cell.contentView addSubview:vv1];
    //        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(65, 5, 100, 20)];
    //        ll1.font=[UIFont systemFontOfSize:15.0f];
    //        ll1.text=@"某某商家";
    //        [cell.contentView addSubview:ll1];
    //        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(65, 33, 260, 20)];
    //        ll2.font=[UIFont systemFontOfSize:13.0f];
    //        ll2.text=@"您买的宝贝已经发出，您购买的宝贝已发出.";
    //        ll2.textColor=[UIColor lightGrayColor];
    //        [cell.contentView addSubview:ll2];
    //        UILabel*ll3=[[UILabel alloc] initWithFrame:CGRectMake(300, 5, 40, 20)];
    //        ll3.font=[UIFont systemFontOfSize:12.0f];
    //        ll3.text=@"13:21";
    //        ll3.textColor=[UIColor lightGrayColor];
    //        [cell.contentView addSubview:ll3];
    //    }else if(indexPath.row==3){
    //        UIImageView*vv1=[[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 50, 50)];
    //        vv1.image = [UIImage imageNamed:@"zxjl1.jpg"];
    //        [cell.contentView addSubview:vv1];
    //        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(65, 5, 100, 20)];
    //        ll1.font=[UIFont systemFontOfSize:15.0f];
    //        ll1.text=@"某某商家";
    //        [cell.contentView addSubview:ll1];
    //        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(65, 33, 260, 20)];
    //        ll2.font=[UIFont systemFontOfSize:13.0f];
    //        ll2.text=@"您买的宝贝已经发出，您购买的宝贝已发出.";
    //        ll2.textColor=[UIColor lightGrayColor];
    //        [cell.contentView addSubview:ll2];
    //        UILabel*ll3=[[UILabel alloc] initWithFrame:CGRectMake(300, 5, 40, 20)];
    //        ll3.font=[UIFont systemFontOfSize:12.0f];
    //        ll3.text=@"13:21";
    //        ll3.textColor=[UIColor lightGrayColor];
    //        [cell.contentView addSubview:ll3];
    //    }
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
